<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增协调人组')"/>
    <th:block th:include="include :: ztree-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add"  th:object="${coordinatorGroup}">
        <div class="form-group">
            <label class="col-sm-3 control-label ">协调人组标识：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" disabled name="authorizeGroup" id="authorizeGroup" th:field="*{authorizeGroup}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">协调人组：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text"  name="description" id="description" th:field="*{description}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">客户订单号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="orderNo" id="orderNo" th:field="*{orderNo}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">销售报价号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="quotationNo" id="quotationNo" th:field="*{quotationNo}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">服务报价号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="distOrderPrefix" id="distOrderPrefix" th:field="*{distOrderPrefix}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">订单号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="distOrderNo" id="distOrderNo" th:field="*{distOrderNo}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">服务报价单号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="serviceQuotationNo" id="serviceQuotationNo" th:field="*{serviceQuotationNo}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="rowversion" id="rowversion" th:field="*{rowversion}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">排键：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" disabled name="rowkey" id="rowkey" th:field="*{rowkey}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">允许数字序列有错：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="allowLapsesInNumbers" id="allowLapsesInNumbers" th:field="*{allowLapsesInNumbers}" required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: ztree-js"/>
<script type="text/javascript">
    /* $("#form-role-add").validate({
         rules: {
             onkeyup: false,
             routeId: {
                 remote: {
                     url: ctx + "goodsPath/checkRouteId",
                     type: "post",
                     dataType: "json",
                     data: {
                         "routeId": function () {
                             return $.common.trim($("#routeId").val());
                         }
                     },
                     dataFilter: function (data, type) {
                         return $.validate.unique(data);
                     }
                 }
             },
         },
         messages: {
             "routeId": {
                 remote: "工艺路线标识已经存在"
             }
         },
         focusCleanup: true
     });*/

    function submitHandler() {
        // if ($.validate.form()) {
        add();
        // }
    }

    function add() {
        var authorizeGroup = $("input[name='authorizeGroup']").val();
        var description = $("input[name='description']").val();
        var orderNo = $("input[name='orderNo']").val();
        var quotationNo = $("input[name='quotationNo']").val();
        var distOrderPrefix = $("input[name='distOrderPrefix']").val();
        var distOrderNo = $("input[name='distOrderNo']").val();
        var serviceQuotationNo = $("input[name='serviceQuotationNo']").val();
        var allowLapsesInNumbers = $("input[name='allowLapsesInNumbers']").val();
        var rowversion = $("input[name='rowversion']").val();
        var rowkey = $("input[name='rowkey']").val();

        $.ajax({
            cache: true,
            type: "POST",
            url: ctx + "coordinator_group_dao/update_coordinatorgroup",
            data: {
                "authorizeGroup": authorizeGroup,
                "description": description,
                "orderNo": orderNo,
                "quotationNo": quotationNo,
                "distOrderPrefix":distOrderPrefix,
                "distOrderNo":distOrderNo,
                "serviceQuotationNo": serviceQuotationNo,
                "allowLapsesInNumbers": allowLapsesInNumbers,
                "rowversion":rowversion,
                "rowkey":rowkey,

            },
            async: false,
            error: function (request) {
                console.log(request);
                $.modal.alertError("系统错误");
            },
            success: function (data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
